<script type="text/javascript">
    if ( /^[0-9 \-]+$/.test('123 - 3434') ) {
        alert('Yes');
    } else {
      alert('No');
    }
</script>
